<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>从已授权的公众号选择</title>
	<link rel="stylesheet" href="/layui/css/layui.css">
	<style type="text/css">
		.importExcel_main_contaienr{
			width: 405px;
			margin: 0 auto;
			padding: 32px 20px;
			background: #fff;
			box-sizing: border-box;
		}
		.importExcel_title{
			font-size: 17px;
			width: 100%;
			text-align: center;
			margin-top: 2px;
			font-weight: 600;
			line-height: 24px;
			letter-spacing: 1px;
		}
		.importExcel_tips_container{
			background: #f0f8ff;
			border-radius: 2px;
			padding: 8px 17px 7px;
			line-height: 17px;
			margin-top: 8px;
			overflow: hidden;
			margin-bottom: 15px;
		}
		.importExcel_tips_container svg{
			float: left;
			width: 16px;
			height: 16px;
		}
		.importExcel_tips_container span{
			font-size: 12px;
			color: rgba(0,0,0,.44);
		}
		.importExcel_tips_container a{
			font-size: 12px;
			color: #1890ff;
		}
		/**/
		.subscription_main_container{

		}
		.subscription_mainList_container{

		}
		.subscription_mainList_container li{
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 0 17px 0 19px;
			background: #fbfbfb;
			border-radius: 3px;
			border: 1px solid #eee;
			margin-bottom: 8px;
			font-size: 14px;
			color: #333;
			height: 63px;
		}
		.subscription_mainList_container li input{
			cursor: pointer;
		}
		.subscription_mainListInfo_container{
			display: flex;
			align-items: center;
		}
		.subscription_mainListInfo_container img{
			width: 38px;
			height: 38px;
			margin-right: 12px;
		}
		.subscription_mainListInfo_container span{
			font-size: 14px;
			color: #333;
		}
		.subscription_footer_container{
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-top: 20px;
		}
		.subscription_footer_container a{
			color: #1890ff;
			font-size: 14px;
		}
		.subscription_footerRight_container{

		}
		.subscription_footerRight_container button{
			outline: none;
			appearance: none;
			margin-left: 10px;
			height: 28px;
			width:30px;
			padding:0 15px;
			line-height: 28px;
			box-sizing: content-box;
			cursor: pointer;
		}
		.publicButton_cancel{
			background-color: #fff;
			border: 1px solid #d9d9d9;
			font-size: 14px;
			color: rgba(0,0,0,.65);
			background: #fff;
		}
		.publicButton_confirm{
			background-color: #fff;
			border: 1px solid #1890ff;
			font-size: 14px;
			color: #fff;
			background: #1890ff;
		}
	</style>
</head>
<body>
	<form action="authorizer_list.html">
		<div class="importExcel_main_contaienr">
			<h2 class="importExcel_title">从已授权的公众号选择</h2>
			<div class="importExcel_tips_container">
				<svg t="1611650419506" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3460" width="18" height="18"><path d="M797.4 725.4l-54.2-45.9V436.6c0-61.6-24-119.6-67.6-163.2-36.3-36.3-82.6-59-132.7-65.6v-19.2c0-16.6-13.4-30-30-30s-30 13.4-30 30v19.1c-50.4 6.4-97 29.2-133.6 65.7-43.6 43.6-67.6 101.5-67.6 163.2v242.8l-54.9 45.9c-9.7 8.1-13.3 21.4-9 33.3s15.6 19.8 28.2 19.8h170.7c4.4 48.7 45.4 87.1 95.3 87.1s90.9-38.3 95.3-87.1H778c12.6 0 23.8-7.9 28.2-19.7s0.8-25.2-8.8-33.3z m-285.4 80c-16.7 0-30.8-11.6-34.6-27.1h69.2c-3.8 15.5-17.9 27.1-34.6 27.1z" fill="#1990ff" p-id="3461"></path></svg>
				<span class="importExcel_tips"> 请选择满足 1、已认证服务号 2、绑定在企业微信开放平台的公众号</span>

			</div>

			<div class="subscription_main_container">
				<ul class="subscription_mainList_container">
					{loop $list as $lists}
					<li>
						<div class="subscription_mainListInfo_container">
							<img src="{$lists->message->authorizer_info->head_img}">
							<span>{$lists->message->authorizer_info->nick_name}</span>
						</div>
						<input id="checkbox1" type="checkbox" name="checkbox1s" value="{$lists->authorizer_appid}" {if $lists->select_status == 2}checked{/if}>
					</li>
					{/loop}
				</ul>
			</div>
			<div class="subscription_footer_container">
				
				<div class="subscription_footerRight_container">
					<button onclick="parent.layer.closeAll()" type="button" id="Button_cancel" class="layui-btn layui-btn-primary">取消</button>
					<button class="layui-btn layui-btn-normal apanel-confirm" type="button"id="Button_confirm" >保存</button>
				</div>

			</div>
		</div>
		
	</form>
	
	<script src="/layui/layui.js"></script>
	<script src="/js/ajax.js"></script>
	<script src="/cdn/jquery.js"></script>
	<script type="text/javascript">
		layui.use('layer', function(e){
			console.log(e);
		 	var layer = layui.layer;
		});
		$('#Button_cancel').click(function(){
			parent.layer.closeAll('iframe');
		})
		// 确认
		$('#Button_confirm').on('click', function() {
			var ids = [];
			var obj = document.getElementsByName("checkbox1s");	
			for(var i=0;i<obj.length;i++){
				if(obj[i].checked){
					ids.push(obj[i].value);
				}
			}
			myAjaxPost(false, true, '', { authorizer_appid:ids}, function (resp) {
				if(resp.status == "success"){
					parent.layer.closeAll('iframe');
				}
			})
		})
		
	</script>
</body>
</html>